<jsp:directive.page contentType="text/html;charset=UTF-8" />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="../../WEB-INF/c.tld" prefix="c" %>

<div class="main">
	<div class="container">
		<h2 class="left"><bean:message key="relai.list.mainTitle" /></h2>
		 <form action="<%= request.getContextPath() %>/list-relai.do" method="get" class="well form-inline right">
	    	<bean:message key="general.trierPar" />
	    	<select name="type">
	    		<option value="1" ${filtre.numero }><bean:message key="relai.Numero" /></option>
	    		<option value="2" ${filtre.name }><bean:message key="relai.Name" /></option>
	    		<option value="3" ${filtre.ville }><bean:message key="relai.Ville" /></option>
	    	</select>
		    <button type="submit" class="btn btn-success"><bean:message key="general.trier" /></button>
	    </form>
	    <div style="clear:both"/>
	    <c:if test="${success != null }">
			<div class="alert alert-success">
				<bean:message key="${success }" />
    		</div>
		</c:if>
		<c:if test="${error != null}">
			<div class="alert alert-error">
				<bean:message key="${error }" />
    		</div>
		</c:if>
		<table class="table table-striped">
			<thead>
				<tr>
					<th><bean:message key="relai.Numero" /></th>
					<th><bean:message key="relai.Name" /></th>
					<th><bean:message key="relai.Ville" /></th>
					<th><bean:message key="general.action" /></th>
				</tr>
			</thead>
			<tbody>
			<c:forEach items="${listRelai}" var="relai">
				<tr>
					<td>${relai.numeroRelai }</td>
					<td>${relai.nom }</td>
					<td>${relai.adresse.ville }</td>
					<td>
						<div class="listAction">
							<a href="<%= request.getContextPath() %>/update-relai.do?id=${relai.idRelai}" title="Edit" alt="Edit"><div class="icon-edit"></div></a>
							<a href="<%= request.getContextPath() %>/delete-relai.do?id=${relai.idRelai}" title="Remove" alt="Remove"><div class="icon-remove"></div></a>
						</div>
					</td>
				</tr>
			</c:forEach>
			
			</tbody>
    	</table>
    	<div class="linkCenter"><a class="btn btn-primary" href="<%= request.getContextPath() %>/new-relai.do"><bean:message key="relai.New" /></a></div>
	</div>
</div>